package com.kystar.ledcontrol.recycleview.info;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by peanut on 2018/05/25.
 */

public class ImageViewInfo implements Parcelable {
    private int imageWidth;
    private int imageHeight;
    private int x;
    private int y;
    private int center_x;
    private int center_y;

    public int getImageWidth() {
        return imageWidth;
    }

    public void setImageWidth(int imageWidth) {
        this.imageWidth = imageWidth;
    }

    public int getImageHeight() {
        return imageHeight;
    }

    public void setImageHeight(int imageHeight) {
        this.imageHeight = imageHeight;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getCenter_x() {
        return center_x;
    }

    public void setCenter_x(int center_x) {
        this.center_x = center_x;
    }

    public int getCenter_y() {
        return center_y;
    }

    public void setCenter_y(int center_y) {
        this.center_y = center_y;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.imageWidth);
        dest.writeInt(this.imageHeight);
        dest.writeInt(this.x);
        dest.writeInt(this.y);
        dest.writeInt(this.center_x);
        dest.writeInt(this.center_y);
    }

    public ImageViewInfo() {
    }

    protected ImageViewInfo(Parcel in) {
        this.imageWidth = in.readInt();
        this.imageHeight = in.readInt();
        this.x = in.readInt();
        this.y = in.readInt();
        this.center_x = in.readInt();
        this.center_y = in.readInt();
    }

    public static final Creator<ImageViewInfo> CREATOR = new Creator<ImageViewInfo>() {
        @Override
        public ImageViewInfo createFromParcel(Parcel source) {
            return new ImageViewInfo(source);
        }

        @Override
        public ImageViewInfo[] newArray(int size) {
            return new ImageViewInfo[size];
        }
    };
}
